package com.example.finalassessment.util;

public enum ExceptionCodeMsgEnum {
    SERVER_ERROR(50000, "服务器开小差了"),
    CONTENT_NOT_EXIST(10001, "请求内容不存在"),
    USERNAME_NOT_EXIST(10002, "查询内容不存在"),
    USERNAME_ALREADY_EXISTS(10003, "用户名已存在"),
    INVALID_USERNAME_OR_PASSWORD(10004, "账号或密码错误"),
    DELETE_FAILED(10005, "删除失败，记录不存在或删除操作失败"),
    UPDATE_FAILED(10006, "更新失败"),
    PRODUCT_NOT_FOUND(1007,"商品未找到"),
    PRODUCT_ALREADY_EXISTS(1008,"商品已存在"),
    ADD_FAILED(1009,"商品添加失败"),
    CATEGORY_NOT_FOUND(1010,"商品分类不存在");


    private Integer code;
    private String message;

    ExceptionCodeMsgEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
